define([], function () {
    Array.prototype.remove = function (index) {
        if (isNaN(index) || index > this.length) {
            return false;
        }

        for (var i = 0, j = 0; i < this.length; i++) {
            if (this[i] != this[index]) {
                this[j++] = this[i];
            }
        }
        this.length -= 1;
    }

    Array.prototype.hardremove = function (index) {
        if (isNaN(index) || index > this.length) {
            return false;
        }
        this.splice(index, 1);
    }

    /**
     * 扩展Array方法, 去除数组中空白数据
     */
    Array.prototype.notempty = function () {
        var arr = [];
        this.map(function (val, index) {
            //过滤规则为，不为空串、不为null、不为undefined，也可自行修改
            if (val !== "" && val != undefined) {
                arr.push(val);
            }
        });
        return arr;
    }

    return Array;
});